<template>
  <div>
    <div id="Residents-title">居民标签</div>
    <div class="Residents-con" v-for="(obj, index) in list" :key="index">
      <span class="Residents-text"> {{ obj.name }} </span>
      <el-progress :percentage="obj.num" :stroke-width="8" :format="format"></el-progress>
    </div>
  </div>
</template>

<script>
import axios from 'axios'
// axios.defaults.baseURL = "http://localhost:8000"
export default {
  // created(){
  //   axios({
  //     url:"/home/getResidentsList",
  //     method:"get"
  //   }).then((res) =>{
  //     this.list = res.data
  //   })
  // },
  methods: {
      format(percentage) {
        return `${percentage}`
      }
  },
  data() {
    return {
      list:[{name:'高血压',num:'40'},{name:'冠心病',num:'30'},{name:'高血糖',num:'50'},{name:'高血脂',num:'70'},{name:'慢病护理',num:'20'},{name:'多动症',num:'30'}]
    }
  },
}
</script>

<style>
    #Residents-title{
        width: 100%;
        height: 40px;
        line-height: 40px;
    }
    .Residents-con{
      width: 100%;
      height: 42px;
      margin-top: 10px;
    }
    .Residents-text{
      color: darkgray;
      font-size: 13px;
    }
</style>